

import { getFiberCurrentPropsFromNode } from "./ReactDOMComponentTree";

/**
 * 
 * @param {*} fiberInst fiber实例
 * @param {*} registrationName react事件名称 onClick
 * @returns 
 */
export default function getListener(fiberInst,registrationName){
    //return fiberInst.props[registrationName];
    const stateNode = fiberInst.stateNode;
    const props = getFiberCurrentPropsFromNode(stateNode);
    const listener = props[registrationName];
    return listener;
}